package com.zhentao.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName product
 */
@TableName(value ="product")
@Data
public class Product implements Serializable {
    /**
     * 商品Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 商品价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 商品描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 审核 0未审核  1审核成功 2审核被拒 3转人工
     */
    @TableField(value = "audit")
    private Integer audit;

    /**
     * 上下架 0：下架状态 1上架状态
     */
    @TableField(value = "state")
    private Integer state;

    /**
     * 删除外键 0删除 1正常显示
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    /**
     * 将html生成到minio里面的静态地址
     */
    @TableField(value = "static_uri")
    private String staticUri;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 审核通过时间
     */
    @TableField(value = "audit_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}